<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>
<body>
    <!-- 对一个整数分解质因数。例如： 90 = 2 * 3 * 3 * 5 -->

    <script>
        
        var num = prompt("请输入一个正整数:");
        var i = 2;
        document.write(num+"=");
        while(i <= num){
            if(num % i == 0){
                document.write(i);
                if(num / i != 1){
                    document.write(" * ");
                }
                num /= i;
            }else{
                i++;
            }
        }

    </script>


</body>
</html>